home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Read-Me1.3 / Autodocs1.3 / parallel.doc < prev    next >
Text File  |  1988-07-26  |  10KB  |  287 lines

  1.  
  2. TABLE OF CONTENTS
  3.  
  4. parallel.device/command/Clear
  5. parallel.device/command/Flush
  6. parallel.device/command/Query
  7. parallel.device/command/Read
  8. parallel.device/command/Reset
  9. parallel.device/command/SetParams
  10. parallel.device/command/Start
  11. parallel.device/command/Stop
  12. parallel.device/command/Write
  13. parallel.device/function/OpenDevice
  14.  
  15.  
  16. parallel.device/command/Clear                 parallel.device/command/Clear
  17.  
  18.    NAME
  19.        Clear -- clear the parallel port buffer
  20.  
  21.    FUNCTION
  22.        This command just RTS's (no buffer to clear)
  23.  
  24.    IO REQUEST
  25.        io_Message      mn_ReplyPort initialized
  26.        io_Device       set by OpenDevice
  27.        io_Unit         set by OpenDevice
  28.        io_Command      CMD_CLEAR (05)
  29.  
  30.  
  31. parallel.device/command/Flush                 parallel.device/command/Flush
  32.  
  33.    NAME
  34.        Flush -- clear all queued I/O requests for the parallel port
  35.  
  36.    FUNCTION
  37.        This command purges the read and write request queues for the
  38.        parallel device. 
  39.  
  40.    IO REQUEST
  41.        io_Message      mn_ReplyPort initialized
  42.        io_Device       set by OpenDevice
  43.        io_Unit         set by OpenDevice
  44.        io_Command      CMD_FLUSH (08)
  45.  
  46.  
  47. parallel.device/command/Query                 parallel.device/command/Query
  48.  
  49.    NAME
  50.        Query -- query parallel port/line status
  51.  
  52.    FUNCTION
  53.        This command return the status of the parallel port lines and
  54.        registers. 
  55.  
  56.    IO REQUEST
  57.        io_Message      must have mn_ReplyPort initialized
  58.        io_Device       set by OpenDevice
  59.        io_Unit         set by OpenDevice
  60.        io_Command      PDCMD_QUERY (09)
  61.  
  62.    RESULTS
  63.        io_Status        BIT  ACTIVE  FUNCTION
  64.  
  65.                         0     high   printer busy toggle (offline)
  66.                         1     high   paper out
  67.                         2     high   printer selected on the A1000
  68.                                      printer selected & serial "Ring
  69.                                      Indicator" on the A500/A2000
  70.                                      Use care when making cables.
  71.                         3      -     read=0,write=1
  72.                       4-7            reserved
  73.  
  74.    BUGS
  75.     In a earlier version of this AutoDoc, BUSY and PSEL were reversed.
  76.     The function has always been correct.
  77.  
  78.  
  79. parallel.device/command/Read                   parallel.device/command/Read
  80.  
  81.    NAME
  82.        Read -- read input from parallel port
  83.  
  84.    FUNCTION
  85.        This command causes a stream of characters to be read from the
  86.        parallel I/O register. The number of characters is specified in
  87.        io_Length.
  88.        The parallel.device has no internal buffer; if no read request has
  89.        been made, pending input (i.e. handshake request) is not
  90.        acknowledged.
  91.  
  92.    IO REQUEST
  93.        io_Message      mn_ReplyPort initialized
  94.        io_Device       set by OpenDevice
  95.        io_Unit         set by OpenDevice
  96.        io_Command      CMD_READ (02)
  97.        io_Flags        If IOF_QUICK is set, driver will attempt Quick IO
  98.        io_Length       number of characters to receive.
  99.        io_Data         pointer where to put the data.
  100.  
  101.    RESULTS
  102.        io_Error -- if the Read succeded, then io_Error will be null.
  103.            If the Read failed, then io_Error will contain an error code.
  104.  
  105.    SEE ALSO
  106.        parallel.device/command/Read
  107.        parallel.device/command/SetParams
  108.  
  109.  
  110. parallel.device/command/Reset                 parallel.device/command/Reset
  111.  
  112.    NAME
  113.        Reset -- reinitializes the parallel device
  114.  
  115.    FUNCTION
  116.        This command resets the parallel device to its freshly initialized
  117.        condition. It aborts all I/O requests both queued and current and
  118.        sets the devices's flags and parameters to their boot-up time 
  119.        default values.
  120.  
  121.    IO REQUEST
  122.        io_Message      mn_ReplyPort initialized
  123.        io_Device       set by OpenDevice
  124.        io_Unit         set by OpenDevice
  125.        io_Command      CMD_RESET (01)
  126.  
  127.    RESULTS
  128.        Error -- if the Reset succeded, then io_Error will be null.
  129.            If the Reset failed, then the io_Error will be non-zero.
  130.  
  131.  
  132. parallel.device/command/SetParams         parallel.device/command/SetParams
  133.  
  134.    NAME
  135.        SetParams -- change parameters for the parallel device
  136.  
  137.    FUNCTION
  138.        This command allows the caller to change parameters for the
  139.        parallel port device. It will disallow changes if any reads or
  140.        writes are active or queued.  The PARB_EOFMODE bit of io_ParFlags
  141.        controlls whether the io_PTermArray is to be used as an additional
  142.        termination criteria for reads and writes.  It may be set directly
  143.        without a call to SetParams, setting it here performs the
  144.        additional service of copying the PTermArray into the device
  145.        default array which is used as the initial array for subsequent
  146.        device opens. The Shared bit can be changed here, and overrides the
  147.        current device access mode set at OpenDevice time.
  148.  
  149.    IO REQUEST
  150.        io_Message      mn_ReplyPort initialized
  151.        io_Device       preset by OpenDevice
  152.        io_Unit         preset by OpenDevice
  153.        io_Command      PDCMD_SETPARAMS (0A)
  154.               NOTE that the following fields of your IORequest
  155.                        are filled by Open to reflect the parallel device's
  156.                        current configuration.
  157.        io_PExtFlags    must be set to zero, unless used
  158.        io_ParFlags     see definition in parallel.i or parallel.h
  159.               NOTE that x00 yields exclusive access, termarray
  160.                        inactive.
  161.        io_PTermArray   ASCII descending-ordered 8-byte array of
  162.                        termination characters. If less than 8 chars
  163.                        used, fill out array w/lowest valid value.
  164.                        Terminators are used only if EOFMODE bit of
  165.                        io_Parflags is set. (e.g. x512F040303030303 )
  166.                        This field is filled on OpenDevice only if the
  167.                        EOFMODE bit is set.
  168.  
  169.    RESULTS
  170.        io_Error -- if the SetParams succeded, then io_Error will be null.
  171.            If the SetParams failed, then io_Error will be non-zero.
  172.  
  173.  
  174. parallel.device/command/Start                 parallel.device/command/Start
  175.  
  176.    NAME
  177.        Start -- restart paused I/O over the parallel port
  178.  
  179.    FUNCTION
  180.        This command restarts the current I/O activity on the parallel
  181.        port by reactivating the handshaking sequence.
  182.  
  183.    IO REQUEST
  184.        io_Message      mn_ReplyPort initialized
  185.        io_Device       set by OpenDevice
  186.        io_Unit         set by OpenDevice
  187.        io_Command      CMD_START (07)
  188.  
  189.    SEE ALSO
  190.        parallel.device/command/Stop
  191.  
  192.  
  193. parallel.device/command/Stop                   parallel.device/command/Stop
  194.  
  195.    NAME
  196.        Stop -- pause current activity on the parallel device
  197.  
  198.    FUNCTION
  199.        This command halts the current I/O activity on the parallel
  200.        device by discontinuing the handshaking sequence.
  201.  
  202.    IO REQUEST
  203.        io_Message      mn_ReplyPort initialized
  204.        io_Device       set by OpenDevice
  205.        io_Unit         set by OpenDevice
  206.        io_Command      CMD_STOP (06)
  207.  
  208.    SEE ALSO
  209.        parallel.device/command/Start
  210.  
  211.    BUGS
  212.     Using any other parallel.device command will restart IO.
  213.  
  214.  
  215. parallel.device/command/Write                 parallel.device/command/Write
  216.  
  217.    NAME
  218.        Write -- send output to parallel port
  219.  
  220.    FUNCTION
  221.        This command causes a stream of characters to be written to the
  222.        parallel output register. The number of characters is specified in
  223.        io_Length, unless -1 is used, in which case output is sent until
  224.        a zero byte in the data: note that this is independent of setting
  225.        EOFMODE in io_ParFlags and using the PTermArray to terminate the
  226.        write.
  227.  
  228.    IO REQUEST
  229.        io_Message      mn_ReplyPort initialized
  230.        io_Device       set by OpenDevice
  231.        io_Unit         set by OpenDevice
  232.        io_Command      CMD_WRITE (03)
  233.        io_Flags        If IOF_QUICK is set, driver will attempt Quick IO
  234.        io_Length       number of characters to transmit, or if set
  235.                        to -1 send until zero byte encountered
  236.        io_Data         pointer to block of data to transmit
  237.  
  238.    RESULTS
  239.        io_Error -- If the Write succeded, then io_Error will be null.
  240.             If the Write failed, then io_Error will contain an error code.
  241.  
  242.    SEE ALSO
  243.        parallel.device/command/Read
  244.        parallel.device/command/SetParams
  245.  
  246.  
  247. parallel.device/function/OpenDevice
  248.  
  249.    NAME
  250.        Open -- a request to open the parallel port
  251.  
  252.    SYNOPSIS
  253.        error = OpenDevice("parallel.device", unit, ioExtPar, flags)
  254.        D0                  A0                D0    A1        D1
  255.                   
  256.  
  257.    FUNCTION
  258.        This is an exec call that starts up the parallel.device.
  259.  
  260.        This function allows the requestor software access to the parallel
  261.        device.  Unless the shared-access bit (bit 5 of io_ParFlags) is
  262.        set, exclusive use is granted and no other access is allowed
  263.        until the owner closes the device.  The PTermArray of the ioExtPar
  264.        is initialized only if the EOFMODE bit is set in io_ParFlags.
  265.  
  266.    INPUTS
  267.        "parallel.device" - a pointer to literal string "parallel.device"
  268.        unit - Must be zero for future compatibility
  269.        ioExtPar - pointer to an IO Request block of structure IOExtPar
  270.      to be initialized by the Open routine.  (see devices/parallel.h for
  271.      definition) 
  272.      The io_ParFlags field must be set as desired (see shared-access
  273.      description, above).  Note that this is not a standard IO Request
  274.      structure.
  275.        flags - Must be zero for future compatibility
  276.  
  277.    RESULTS
  278.     d0 -- same as io_Error
  279.        io_Error -- if the Open succeded, then io_Error will be null.
  280.            If the Open failed, then io_Error will be non-zero.
  281.        
  282.    SEE ALSO
  283.        exec/function/CloseDevice
  284.  
  285.  
  286.  
  287.